package cmd

import (
	"fmt"
	"github.com/cuiyuanxin/airuisi-admin/cmd/server"
	"github.com/cuiyuanxin/airuisi-admin/cmd/version"
	"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
	Use:   "airuisi",
	Short: "airuisi General management System command tool",
	Long: `airuisi is a general management system, You can use -h to see specific commands. 
server Starts the web server 
version Checks the current version of the application`,
	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("run airuisi...")
	},
}

func init() {
	rootCmd.AddCommand(version.VersionCmd)
	rootCmd.AddCommand(server.ServerCmd)
}

func Execute() error {
	return rootCmd.Execute()
}
